package edu.nf.supermarket.mapper;

import edu.nf.supermarket.entity.UserCoupon;
import org.apache.ibatis.annotations.Param;

/**
 * @author gwf
 * @date 2025-06-17
 */
public interface UserCouponMapper {

    /**
     * 添加用户优惠券
     * @param userCoupon
     */
    void insertUserCoupon(UserCoupon userCoupon);

    /**
     * 检查用户是否拥有优惠卷
     */
    int countUserCouponByUserIdAndCouponId(@Param("userId") Integer userId, @Param("couponId") Integer couponId);
}
